package com.wangcanxuan.www.dao.mapper;

import com.wangcanxuan.www.annotation.orm.ReturnType;
import com.wangcanxuan.www.annotation.orm.Select;
import com.wangcanxuan.www.entity.po.Task;
import com.wangcanxuan.www.entity.po.Tribe;
import com.wangcanxuan.www.proxy.constants.ReturnDataType;

import java.util.List;

/**
 * 任务类Mapper
 *
 * @author HHLJ
 * @date 2022/03/30
 */
public interface TaskMapper extends BaseMapper<Task>{

    /**
     * 选择搜索部落列表
     *
     * @param tribeId   部落id
     * @param pageCount 页面数
     * @return {@link List}<{@link Tribe}>
     */
    @Select(sql = "SELECT * FROM `task` WHERE tribe_id = ? ORDER BY level ASC LIMIT ?,10")
    @ReturnType(returnType = ReturnDataType.LIST)
    List<Task> selectTaskList(String tribeId, int pageCount);
}
